A tree structure may be used to define a logical structure of documents. For example, the tree structure may include objects that represent respective portions of the documents. In accordance with this example, an object may encapsulate (e.g., hide) data to protect the data from direct external manipulation. In one example implementation, an application programming interface (API), such as a document object model (DOM), may be constructed as a tree structure to define a logical structure of an HTML document, an XHTML document, and/or an XML document. A variety of techniques has been proposed for reordering items in documents. However, each such technique has its limitations. For instance, the reordering capabilities of conventional techniques typically are limited to flat lists and/or group lists.